package com.glsc.ngateway.platform.controller.glres;


import com.glsc.ngateway.common.api.platform.resp.PlatformResponse;
import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.glres.GlscIpInfo;
import com.glsc.ngateway.platform.aspect.UserCache;
import com.glsc.ngateway.platform.dto.GlscNetInfoDto;
import com.glsc.ngateway.platform.service.glres.GlscIpInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;


/**
 * 资源管理-ip清单
 */
@RestController
@RequestMapping("/api/res/ipInfo")
@Slf4j
public class GlscIpInfoController {

    @Resource
    private UserCache userCache;

    @Resource
    private GlscIpInfoService glscIpInfoService;

    /**
     * 查询所有ip清单
     *
     * @param request
     * @return
     */
    @GetMapping("/listAll")
    public PlatformResponse<List<GlscIpInfo>> page(HttpServletRequest request) {
        List<GlscIpInfo> glscIpInfos = glscIpInfoService.listAll();
        return PlatformResponse.successData(glscIpInfos);
    }


}
